﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SchoolListList.aspx.cs" Inherits="System_admin_ProductList" %>

<%@ Register Assembly="DevExpress.Web.ASPxGridView.v10.1" Namespace="DevExpress.Web.ASPxGridView"
    TagPrefix="dxwgv" %>
<%@ Register TagPrefix="dxcb" Assembly="DevExpress.Web.v10.1" Namespace="DevExpress.Web.ASPxCallback" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v10.1" Namespace="DevExpress.Web.ASPxEditors"
    TagPrefix="dxe" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <link rel="stylesheet" type="text/css" href="../../css/main.css" />
    <script type="text/javascript" src="../../../Scripts/jquery-1.4.1.js"></script>
    <script type="text/javascript">
        function btnCreateClick() {
            var myArguments = "resizable:yes;scroll:yes;status:no;dialogWidth=800px;dialogHeight=800px;center=yes;help=no";
            var result = window.showModalDialog("School.aspx?pagemode=add&time=" + (new Date()), self, myArguments);
            if (result == "ok") {
                var result = $("#<%=btnQuery.ClientID%>");
                result[0].click();
            }
        }

        function gridCustomButtonClick(s, e) {
            s.GetRowValues(e.visibleIndex, "SCHOOLID", getTheSelectedRowsValues);
        }
        function getTheSelectedRowsValues(selectedValues) {
            if (selectedValues.length == 0) {
                //
            }
            else {
                var myArguments = "resizable:yes;scroll:yes;status:no;dialogWidth=800px;dialogHeight=800px;center=yes;help=no";
                var querystring = "School.aspx?pagemode=update&time=" + (new Date()) + "&SchoolID=" + selectedValues;
                var result = window.showModalDialog(querystring, self, myArguments);
                if (result == "ok") {
                    var result = $("#<%=btnQuery.ClientID%>");
                    result[0].click();
                }
            }
        }

    </script>
</head>
<body>
    <div style="width: 777px">
        <div id="title">
            当前位置：系统管理->学校管理</div>
        <div id="form">
            <fieldset>
                <legend>查询</legend>
                <div>
                    <table width="100%">
                        <tbody>
                            <tr>
                                <td align="right" style="width: 10%">
                                    学校编号：
                                </td>
                                <td align="left" style="width: 40%">
                                    <input type="text" />
                                </td>
                                <td align="right" style="width: 10%">
                                </td>
                                <td align="left" style="width: 40%">
                                </td>
                                <td align="center" style="width: 10%">
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    学校名称：
                                </td>
                                <td align="left">
                                </td>
                                <td align="right">
                                </td>
                                <td align="left">
                                </td>
                                <td align="center">
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                </td>
                                <td align="left">
                                </td>
                                <td align="right">
                                </td>
                                <td align="left">
                                </td>
                                <td align="center">
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </fieldset>
        </div>
        <div class="clear">
        </div>
        <form id="form1" runat="server">
        <div class="toolbar">
            <div>
                <div style="float: left;">
                    <dxe:ASPxButton ID="btnProductCreate" runat="server" Text="新建" AutoPostBack="False"
                        Width="55px" Height="16px" Image-Url="~/system/images/add.gif" Paddings-Padding="0px"
                        FocusRectPaddings-Padding="0px">
                        <ClientSideEvents Click="btnCreateClick" />
                    </dxe:ASPxButton>
                </div>
                <div style="width: 5px; float: left;">
                </div>
                <div style="float: right;">
                    <dxe:ASPxButton ID="btnQuery" runat="server" Text="查询" AutoPostBack="False" Width="55px"
                        Height="16px" Paddings-Padding="0px" Image-Url="" OnClick="btnQuery_Click" FocusRectPaddings-Padding="0px">
                    </dxe:ASPxButton>
                </div>
                <div style="width: 5px; float: right;">
                    &nbsp
                </div>
                <div style="float: right;">
                    <dxe:ASPxButton ID="btnExcel" runat="server" Text="导出" AutoPostBack="False" Width="55px"
                        Height="16px" Image-Url="~/system/images/exl.gif" Paddings-Padding="0px" FocusRectPaddings-Padding="0px">
                    </dxe:ASPxButton>
                </div>
            </div>
        </div>
        <div class="clear">
        </div>
        <div>
            <table cellspacing="0" cellpadding="5" width="100%" border="0">
                <tr>
                    <td>
                        <dxwgv:ASPxGridView ID="gridSearchResult" ClientInstanceName="gridSearchResult" runat="server"
                            KeyFieldName="SCHOOLID" AutoGenerateColumns="False" Settings-ShowFooter="true"
                            OnRowDeleting="gridSearchResult_RowDeleting" SettingsPager-AlwaysShowPager="true"
                            Width="100%">
                            <Styles>
                                <GroupPanel HorizontalAlign="Left">
                                </GroupPanel>
                                <AlternatingRow Enabled="True">
                                </AlternatingRow>
                                <CommandColumn Paddings-Padding="1">
                                </CommandColumn>
                            </Styles>
                            <Columns>
                                <dxwgv:GridViewCommandColumn Caption="&nbsp;&nbsp;" CellStyle-Wrap="False" VisibleIndex="0">
                                    <NewButton Visible="False" />
                                    <EditButton Visible="False" />
                                    <DeleteButton Visible="true" />
                                    <CustomButtons>
                                        <dxwgv:GridViewCommandColumnCustomButton Text="编辑">
                                        </dxwgv:GridViewCommandColumnCustomButton>
                                    </CustomButtons>
                                    <CellStyle Wrap="False">
                                    </CellStyle>
                                </dxwgv:GridViewCommandColumn>
                                <dxwgv:GridViewDataColumn FieldName="SCHOOLID" Caption="学校编号" VisibleIndex="0" />
                                <dxwgv:GridViewDataColumn FieldName="SCHOOLSHORTNAME" Caption="学校简称" VisibleIndex="1" />
                                <dxwgv:GridViewDataColumn FieldName="SCHOOLNAME" Caption="学校" VisibleIndex="2" />
                                <dxwgv:GridViewDataColumn FieldName="SCHOOLPHONE" Caption="联系电话" VisibleIndex="3" />
                                <dxwgv:GridViewDataColumn FieldName="SCHOOLADDR" Caption="学校地址" VisibleIndex="4" />
                                <dxwgv:GridViewDataColumn FieldName="SCHOOLURL" Caption="学校网址" VisibleIndex="5" />
                            </Columns>
                            <Settings ShowGroupPanel="True" ShowFooter="True" ShowGroupFooter="VisibleAlways"
                                ShowHorizontalScrollBar="false" ShowVerticalScrollBar="false" />
                            <SettingsBehavior AllowDragDrop="true" AllowGroup="true" AutoExpandAllGroups="true"
                                ConfirmDelete="true" AllowFocusedRow="true" />
                            <SettingsText ConfirmDelete="确定要删除吗？" />
                            <SettingsPager PageSize="10" Mode="ShowPager" SEOFriendly="Enabled" Position="Bottom"
                                Summary-Visible="true">
                                <Summary AllPagesText="分页{0} - {1} (总{2}条)" Text="当前第{0}页，共{1}页 (共{2}条记录)" />
                            </SettingsPager>
                            <ClientSideEvents CustomButtonClick="function(s, e) {gridCustomButtonClick(s,e);return false;}" />
                        </dxwgv:ASPxGridView>
                    </td>
                </tr>
            </table>
        </div>
        </form>
    </div>
</body>
</html>
